#!/bin/csh -f

#****************************************************************************
#***
#***   Copyright (c) 1997 by Max Moroz and ABKGroup, UCLA VLSI CAD Laboratory,
#***    UCLA Computer Science Department, Los Angeles, CA 90095-1596 USA, 
#***    and by the Regents of the University of California.    
#***    All rights reserved.   
#***
#***    No portion of this package may be used, copied, or transmitted for
#***    any purpose, including any research or commercial purpose,
#***    without the express written consent of Professor Andrew B. Kahng,
#***    UCLA Computer Science Department, 3713 Boelter Hall, Los Angeles,
#***    CA 90095-1596 USA.   Any copy made of this file must include this
#***    notice.    ABKGroup and the Regents of the University of California
#***    retain title to all copies of this file and/or its compiled
#***    derivatives.
#***
#*****************************************************************************/

echo '------- Running Test 0a..' > new.out
echo Running Test 0a...
HGraphTest0.exe -f TESTS/addNetAreM.aux -saveNodes testOut -saveNetD testOut >>& new.out
cat testOut.* >>new.out
rm testOut.*

echo '------- Running Test 0b..' >> new.out
echo Running Test 0b...
HGraphTest0.exe -f TESTS/addNetsNodes.aux -saveNodes testOut -saveNetD testOut >>& new.out
cat testOut.* >>new.out
rm testOut.*

echo '------- Running Test 0c..' >> new.out
echo Running Test 0c...
HGraphTest0.exe -f TESTS/testAux1.aux -saveNodes testOut -saveNetD testOut >>& new.out
cat testOut.*    >>new.out
rm testOut.*

echo '------- Running Test 0d..' >> new.out
echo Running Test 0d...
HGraphTest0.exe -f TESTS/testAux2.aux -saveNodes testOut -saveNetD testOut >>& new.out
cat testOut.*    >>new.out
rm testOut.*

echo '------- Running Test 0e..' >> new.out
echo Running Test 0e...
HGraphTest0.exe -f TESTS/testAux3.aux -saveNodes testOut -saveNetD testOut >>& new.out
cat testOut.* >>new.out
rm testOut.*

echo '------- Running Test 0f..' >> new.out
echo Running Test 0f...
HGraphTest0.exe -f TESTS/testAux4.aux -saveNodes testOut -saveNetD testOut >>& new.out
cat testOut.* >>new.out
rm testOut.*

echo '------- Running Test 1a...' >> new.out
echo Running Test 1a...
HGraphTest1.exe -f TESTS/addNetsNodes.aux >>& new.out

echo '------- Running Test 1b...' >> new.out
echo Running Test 1b...
HGraphTest1.exe -f TESTS/case1-h.aux >>& new.out

echo '-------- Running Test 2a..' >> new.out
echo Running Test 2a..
HGraphTest1.exe -f TESTS/test-0.aux >>& new.out

echo '-------- Running Test 2b..' >> new.out
echo Running Test 2b..
HGraphTest2.exe -f TESTS/test-0.aux >>& new.out



egrep -v "(emory|Created|User|Platform)" new.out > newout.notime
egrep -v "(emory|Created|User|Platform)" expected.out > expectedout.notime

diff newout.notime expectedout.notime > diffs
echo "Differences from precomputed results"
echo "  lines:  words:  bytes:    error log:"
wc diffs

